package com.github.codemperor.core.schedule.example;

import com.github.codemperor.core.schedule.EmScheduleDispatch;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.TaskScheduler;

//you need add "@tk.mybatis.spring.annotation.MapperScan(basePackages = {"com.aihuishou.uptrade.framework.schedule"})" in your SpringBootMainRunner
// when you use, let go of the annotation
//@Configuration
public class JobConfigExample {

    @Bean
    public EmScheduleDispatch emScheduleDispatch() {
        return new EmScheduleDispatch();
    }

    @Bean
    public TaskScheduler taskScheduler() {
        return new EmScheduleDispatch().taskScheduler();
    }
}
